package com.atled.validation;

import com.atled.exceptions.StandardExceptionHandler;

public final class ParameterChecker {

	private static final StandardExceptionHandler exceptionHandler;
	
	static {
		// need to change this to a config read
		exceptionHandler = new StandardExceptionHandler(ParameterChecker.class, true);
	}
	
	public static void notNull(String name, String arg) {
		if (arg == null) {
			exceptionHandler.handle(new IllegalArgumentException(name + " cannot be null"));
		}
	}
	
}
